<?php

namespace adminmatrix\server\app\logic;

trait LogicParamsTrait
{


    protected array $params = [];
    public function getParams()
    {
        $this->params = match (true) {
            $this->request->isGet() => $this->request->get(),
            $this->request->isPost() => $this->request->post(),
            $this->request->isPut() => $this->request->put(),
            $this->request->isDelete() => $this->request->delete(),
        };
        return $this->params;
    }

    public function __destruct()
    {
        return 123;
    }
}